From 14dc9e1c1581fa04b37e81d76499f705512660b2 Mon Sep 17 00:00:00 2001
From: Owen Jacobson <owen@grimoire.ca>
Date: Wed, 6 Nov 2024 18:42:38 -0500
Subject: Split message runs after ten minutes' silence.

I've also refactored how runs are processed, to avoid re-splitting runs every time the channel view is rendered. They're generated when messages are ingested into the `$messages` store, instead.
---
 ui/routes/(app)/ch/[channel]/+page.svelte | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'ui/routes/(app)/ch/[channel]/+page.svelte')

diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/ch/[channel]/+page.svelte
index 49c1c29..0961665 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/ch/[channel]/+page.svelte
@@ -2,12 +2,14 @@
   import { page } from '$app/stores';
   import ActiveChannel from '$lib/components/ActiveChannel.svelte';
   import MessageInput from '$lib/components/MessageInput.svelte';
+  import { messages } from '$lib/store';
 
   let channel = $derived($page.params.channel);
+  let messageRuns = $derived($messages.inChannel(channel));
 </script>
 
 <div class="active-channel">
-  <ActiveChannel {channel} />
+  <ActiveChannel {messageRuns} />
 </div>
 <div class="create-message max-h-full">
   <MessageInput {channel} />
-- 
cgit v1.2.3

